package https.itmanager.com.springboot.extsample;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.stereotype.Component;

@Component
public class MyBeanFactoryAware implements BeanFactoryAware {
    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        System.out.println("=================MyBeanFactoryAware 读取任何Bean对象 "+ beanFactory.getBean(MyBeanFactoryAware.class).getClass().getSimpleName());
    }
}
